import { request } from 'umi';
// 加载数据
export async function loadClientInfo(){
    return request(`/api/admin/client-info`)
}
// 新增数据
export async function saveOne(data:any){
    return request(`/api/admin/client-info`,{
        method:"POST",
        data
    })
}
// 修改数据
export async function updateOne(id:any,data:any){
    return request(`/api/admin/client-info/${id}`,{
        method:"PUT",
        data
    })
}
//删除数据
export function deleteOne(id:number){
    return request(`/api/admin/client-info/${id}`,{
        method:"DELETE"
    })
}
//查找数据
export function select(data:any){
    return request(`/api/admin/client-info/search/`,{
        method:"GET",
        params:data
    })
    .then(function(response) {
      console.log("&&",response);
      return response;
    })
    .catch(function(error) {
      console.log(error);
    });
}
//查找成员行程
export function selectItinerary(data:any){
    return request('/api/admin/client-info/select-itinerary',{
        method:"GET",
        params:data
    })
    .then(function(response) {
        console.log("&&",response);
        return response;
    })
    .catch(function(error) {
        console.log(error);
     });
}